import logging, random

def log_pre(obj):
    return "[%s]: " % obj.__class__.__name__

def get_random_password(length):
    logging.debug('Generate %d-char-long pass' % length)
    password = ''
    for i in range(0, length):
        password = ''.join((password, chr(random.randint(65, (65+26-1)))))

    return password
